﻿using Ace.IdStrategy;
using Chloe.Admin.Common.Tree;
using Chloe.Application.Interfaces;
using Chloe.Application.Models.Member;
using Chloe.Entities;
using Chloe.Admin.Common;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Chloe.Application.Interfaces.Bike;
using Ace;

namespace Chloe.Admin.Areas.BikeClub.Controllers
{
    public class MemberNameController : WebController
    {
        [LoginAuthorizeAttribute]
        // GET: BikeClub/MemberName
        public ActionResult Index()
        {
            return View();
        }
        [HttpGet]
        public ActionResult GetPageData(Pagination pagination, string keyword)
        {
            PagedData<Bike_Member> pagedData = this.CreateService<IMemberAppService>().GetPageData(pagination, keyword);
            return this.SuccessData(pagedData);

        }

        public ActionResult GetNames()
        {
            List<SimpleMemberModel> NameList = this.CreateService<IMemberAppService>().GetSimpleModels();

            return this.SuccessData(NameList);
        }

    }
}